<admintpl file="header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>听单信息</a></li>
    </ul>
    <form class="well form-search" method="post" action="{:U('Runmenanalysis/pn_work_list')}">
        所属团队：
        <select class="select_2" name="formget[company_id]"  style="width: 105px;" >
            <volist name="company_data" id="vo">
                <if condition="$formget.company_id == $vo[company_id]">
                    <option value="{$vo.company_id}" selected>{$vo.company_name}</option>
                    <else /><option value="{$vo.company_id}" >{$vo.company_name}</option>
                </if>
            </volist>
        </select>
        跑客姓名：<input type="text" name="formget[dispatch_name]" style="width: 80px;" value="{$formget.dispatch_name}" placeholder="请输入关键字...">
        跑客电话：<input type="text" name="formget[mobile]" style="width: 80px;" value="{$formget.mobile}" placeholder="请输入关键字...">
        听单状态：
        <select class="select_2" id="work_status" name="formget[work_status]" style="width: 100px;" >
            <option value='-1' {$formget[work_status]==-1?selected:''}>全部</option>
            <option value='0' {$formget[work_status]==0?selected:''}>未听单</option>
            <option value='1' {$formget[work_status]==1?selected:''}>听单</option>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索" />
    </form>
    <table width="100%">
        <tr><td>总数：{$total_count}人</td>
        </tr>
    </table>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th align="center">序号</th>
                <th>所属团队</th>
                <th>所属分公司</th>
                <th>跑客姓名</th>
                <th>跑客电话</th>
                <th>听单状态</th>
                <th>是否接受指派</th>
                <th>今日在线</th>
                <th>累计时长</th>
            </tr>
            </thead>
            <tbody>
            <php> $work_status=array("0"=>'未听单','1'=>'听单');
                $is_accept_dispatchs=array("0"=>'否','1'=>'是');
            </php>
            <foreach name="lists" item="vo" key="k">
                <tr>
                    <td align="center">{$k+1}</td>
                    <td>{$vo[company_id]|getCompanyName}</td>
                    <td>{$vo.company_branch|get_combranch_name}</td>
                    <td>{$vo.dispatch_name}</td>
                    <td>{$vo.mobile}</td>
                    <td>{$work_status[$vo[work_status]]}</td>
                    <td>{$is_accept_dispatchs[$vo[is_accept_dispatch]]}</td>
                    <td>{$vo[todaytime]}</td>
                    <td>{$vo[onlinetime]}</td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <if condition="empty($lists)">
            <div style="padding: 30px;text-align: center;color: #999999">
                <i class="fa fa-database" style="font-size: 38px"></i><br />
                暂无数据
            </div>
        </if>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    setCookie('refersh_time', 0);
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location = "{:U('Runmenanalysis/pn_work_list',$formget)}";
        }
    }
    setInterval(function() {
        refersh_window();
    }, 2000);

</script>
</body>
</html>